<?php include_once($_SERVER['DOCUMENT_ROOT']."/controller/common/common_setting_unit.php"); ?>
<?php include_once("../controller/term-add.php"); ?>




<?php include_once("first_term.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <?php include_once('../../../modules/head.php'); ?>
    <?php include_once('modules/mod-nkeditor-term.php'); ?>
    <link href="../assets/css/style.css" rel="stylesheet" type="text/css"/>
</head>




<body>

<div id="topbar">
    <?php include '../../../modules/topbar.php'; ?>
</div>


<div id="container">
    <!--Container端點01-->
    <div id="maincontent" class="term-list">
        <!--maincontent端點01-->



        <div id="sidebar">
            <?php include '../../../modules/sidebar.php'; ?>
        </div>




        <div id="content">
            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                <legend><h1>新增 品牌/系列 : <? echo $term['name'] ?> </h1></legend>
            </fieldset>

<blockquote class="layui-elem-quote">品牌不能降级为系列，系列可以平调品牌</blockquote>

<div class="detail-box <? echo $system_part ?>">

<div class="detail-boxes term-detail-boxes layui-form">
<ul class="detail-boxing">
<form id="term_detail_form" method="post" onsubmit="return checkRequired(term_name);"
      action="term-add-function.php" enctype="multipart/form-data" name="uploadfile" class="layui-form-pane">

            <li class="mid">
                <label class="layui-form-label">人工编号：</label>
                <div class="layui-input-block">
                    <input type="text" class="layui-input"  name="ai_mid" size="20" value=""></div>
                <em class="explain">(填写您自己设置的编号，人工编号不作排序)</em></li>
             
            <li class="name">
                <label class="layui-form-label">品牌/系列名称：</label>
                <div class="layui-input-block">
                    <input type="text" class="layui-input"  name="ai_name" size="20" value="<?php echo $term['name']?>"></div>
                <em class="explain">(<u style="color:red">*必填项目</u>,填写本品牌的标题)</em>
            </li>
            
            <li class="en_name">
                 <label class="layui-form-label">英文名称：</label>
                 <div class="layui-input-block"><input type="text" class="layui-input" name="ai_en_name" size="20" value="<?php echo $term['en_name']?>"></div>
                 
            </li>




    <li class="term"><label class="layui-form-label">所属品牌：</label>
        <div class="layui-input-block">
            <select name="perant_term_nid" lay-search="">

                <option value="root" <? if ($term['interm'] == "root") {echo "selected='selected'";} ?> >根目录</option>
                <?if($term['interm'] != "root"){?>
                <?php foreach($root_term_list as $key=>$v){?>
                    <option  value="<?php echo $v['nid'];?>"
                             <? if ($term['term1'] == $v['nid']) {echo "selected='selected'";} ?>><?php echo $v['en_name'];?>  (<?php echo $v['name'];?>)</option >
                <?php;}?>
                <?}?>

            </select>
        </div>
        <em class="explain">选择“根目录”会添加为【品牌】，选择某一个品牌，则会成为该品牌下的一个系列</em></li>



<li class="introduce">
    <label class="layui-form-label">品牌系列简介：</label>
    <div class="layui-input-block">
        <textarea name="ai_introduce" cols="20"><? echo $term['introduce'] ?></textarea>
    </div>
    <em class="explain">(填写本品牌的品牌概述文字)</em>
</li>





    <?include_once("modules/mod-images-upload.php");?>


    <li class="title">
        <label class="layui-form-label">网页用标题：</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="ai_title" size="20" value="<? echo $term['title'] ?>">
        </div>
        <em class="explain">(填写浏览器标签页显示的本品牌页名称)</em>
    </li>

    <li class="description">
        <label class="layui-form-label">网页用描述：</label>
        <div class="layui-input-block">
            <textarea name="ai_description"><? echo $term['description'] ?></textarea>
        </div>
        <em class="explain">(填写本品牌页描述性文字，用于搜索引擎的搜索结果显示)</em>
    </li>

    <li class="keyword">
        <label class="layui-form-label">网页用关键词：</label>
        <div class="layui-input-block">
            <textarea name="ai_keyword"><? echo $term['keyword'] ?></textarea>
        </div>
        <em class="explain">(填写本品牌页的关键词，利于搜索引擎抓取)</em>
    </li>

    <li class="url">
        <label class="layui-form-label">网页地址：</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="ai_url" size="20"
                   value="<? echo $term['url'] ?>">
        </div>
        <em class="explain">(填写本品牌页前台网址，用于伪静态设置，利于搜索引擎抓取)</em>
    </li>

            <br />
            
             
<li class="detail">
    <label class="layui-form-label">详情：</label>
    <div class="layui-input-block">
        <textarea name="ai_detail" style="width:800px;height:400px;visibility:hidden;">
            <? echo $term['detail'] ?>
        </textarea>
    </div>
    <em class="explain">(填写本品牌前台显示的详细文字介绍，默认留空)</em>
</li>


 

<li class="listorder">
    <label class="layui-form-label">列表排序：</label>
    <div class="layui-input-block">
    <input type="text" class="layui-input"  name="ai_listorder" size="20" value="0"
           onkeydown="onlyNum();" onfocus="checkdefault(ai_listorder)" onblur="checkempty(ai_listorder)">
    </div>
    <em class="explain">(填写本品牌在所属前台列表下的列表排序，数字越大，排序越靠前)</em>
</li>
        
         
            <li class="hotsale">
                <label class="layui-form-label">热销品牌：</label>
         		
                <div class="layui-input-block">
                    <input name='ai_hotsale' type='radio' value='1'  title="标记热销" <?if($term['hotsale'] == '1'){echo "checked='checked'";}?>/>
                    <input name='ai_hotsale' type='radio' value='0'  title="取消热销" <?if($term['hotsale'] == '0'){echo "checked='checked'";}?>/>
                </div>
           
                <em class="explain">(可标记热销品牌，将在前台添加热销品牌标识或显示热销产品品牌)</em>
             </li>
             

            
             <li class="recommend"><label class="layui-form-label">推荐状态：</label>
             	
                 <div class="layui-input-block">
                    <input name='ai_recommend' type='radio' value='1'  title="推荐品牌" <?if($term['recommend'] == '1'){echo "checked='checked'";}?>/>
                    <input name='ai_recommend' type='radio' value='0'  title="取消推荐" <?if($term['recommend'] == '0'){echo "checked='checked'";}?>/>
                </div>
          
                <em class="explain">(可标记推荐品牌，将在前台添加推荐品牌标识或显示推荐产品品牌)</em>
             </li>
             
             
             <li class="link"><label class="layui-form-label">链接地址：</label>
    <div class="layui-input-block"><input type="text" class="layui-input"  name="ai_link" size="20" value="<? echo $term['link'] ?>"></div>
                <em class="explain">(填写用于前台直接跳转的文章链接，类似于转载文章，默认留空)</em></li>
             
             
               
            <li class="mark"><label class="layui-form-label">标记状态：</label>
            
            	<div class="layui-input-block">
                    <input name='ai_mark' type='radio' value='1'  title="添加标记" <?if($term['mark'] == '1'){echo "checked='checked'";}?>/>
                    <input name='ai_mark' type='radio' value='0'  title="取消标记" <?if($term['mark'] == '0'){echo "checked='checked'";}?>/>
                </div>
           
                <em class="explain">(选择添加标记，以上信息将在前台显示；选择取消标记，以上信息不在前台显示)</em>
             </li>




            <li class="vip"><label class="layui-form-label">权限设置：</label>
            	
                <div class="layui-input-block">
                    <input name='ai_vip' type='radio' value='0'  title="游客可见" <?if($term['vip'] == '0'){echo "checked='checked'";}?>/>
                    <input name='ai_vip' type='radio' value='1'  title="vip1可见" <?if($term['vip'] == '1'){echo "checked='checked'";}?>/>
                    <input name='ai_vip' type='radio' value='2'  title="vip2可见" <?if($term['vip'] == '2'){echo "checked='checked'";}?>/>
                </div>
                
              
                <em class="explain">(设置会员可浏览的权限)</em>
            </li>
             
             
             
             
             <li class="markorder">
                <label class="layui-form-label">标记排序：</label>
                <div class="layui-input-block">
                    <input type="text" class="layui-input" name="ai_markorder" size="20"
                           value="0" onkeydown="onlyNum();"
                           onfocus="checkdefault(ai_markorder)" onblur="checkempty(ai_markorder)">
                </div>
                <em class="explain">(填写品牌在前台列表中的排序，数字越大，排序越靠前)</em>
             </li>



            <li class="clickrate">
                <label class="layui-form-label">点击次数：</label>
                <div class="layui-input-block">
                    <input type="text" class="layui-input" name="ai_clickrate" size="20"
                           value="0" onkeydown="onlyNum();" onfocus="checkdefault(ai_clickrate)"
                           onblur="checkempty(ai_clickrate)">
                </div>
                <em class="explain">(显示此品牌在前台被浏览点击的次数，亦可在由后台管理员自行设置数量)</em>
            </li>
            
			
			<li class="modifytime">
                <label class="layui-form-label">修改时间：</label>
                <div class="layui-input-block">
                    <input type="text" class="layui-input"  name="ai_modifytime" size="20"
                           value="<? echo date("Y-m-d H:i:s") ?>" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
                           class="laydate-icon" >
                </div>
                <em class="explain">(填写品牌修改时间)</em>
            </li>




             <li class="publish"><label class="layui-form-label">发布状态：</label>
             
             	<div class="layui-input-block">
                    <input name='ai_publish' type='radio' value='1'  title="立即发布" checked='checked' />
                    <input name='ai_publish' type='radio' value='0'  title="暂未发布"  />
                </div>
           
                <em class="explain">(选择立即发布，以上信息才能在前台显示；选择暂未发布，只对以上信息进行保存，不在前台显示)</em>
    
             </li>
			 
          
          <li class="layui-form-item is_disabled">
            <label class="layui-form-label">禁止删除：</label>
    
            <div class="layui-input-block">
                    <input name='ai_is_disabled' type='radio' value='1'  title="禁止删除"  />
                    <input name='ai_is_disabled' type='radio' value='0'  title="允许删除"  checked='checked' />
                </div>
                <em class="explain">(如标记了禁止删除，列表页下面不能删除当前信息)</em>
    
         </li>   
             <input name="ai_interm" type="hidden" value="<? echo $term['interm'] ?>" />
             <input name="sys_part" type="hidden" value="<? echo $system_part ?>" />
             <input name="nowpageid" type="hidden" value="<? echo $_REQUEST['nowpageid'] ?>" />
             <input name="sortby" type="hidden" value="<? echo $_REQUEST['sortby'] ?>" />
             
             
        <div class="function">
            <input type="submit" class="layui-btn" value="确认"/>
            <input type="reset" class="layui-btn" value="重置"/>
        </div>
</form>
</ul>
</div>
</div>

<!--content端點01-->
</div>
<!--maincontent端點01-->
<br class="clearfloat" />
</div>
<!--container端點01-->
</div>



<?php include  ROOT_PATH_."/controller/modules/footer.php"; ?>
</body>
</html>
